# -*- coding:utf-8 -*-
# @FileName  :per_reportlog.py
# @Time      :2020/12/18 11:22
# @Author    :Zhoujirong
# @Desc      :
from common.http_request import Request
from biz.support.urls import ServerUrl

class EntReporlogRequest:
    @classmethod
    def reportlog_list(cls,cookie):
        '''跳转报告使用记录页面'''
        req = Request(ServerUrl.ent_reportlog_list_url,headers=cookie)
        return req.get()

    @classmethod
    def get_page(cls,curPage,
                    maxSize,
                    search_EQ_enterpriseName,
                    search_EQ_signCode,
                    search_EQ_uniformSocialCredCode,
                    search_EQ_orgInstCode,
                    search_EQ_operateUser,
                    search_EQ_operateDept,
                    search_GTE_LTE_operateDate_DATE_RANGE,
                    search_EQ_operateType,
                    search_EQ_sysCode,
                    search_EQ_queryFormat,cookie):
        '''检索'''
        data = {
            'curPage':curPage,
            'maxSize':maxSize,
            'search_EQ_enterpriseName':search_EQ_enterpriseName,
            'search_EQ_signCode':search_EQ_signCode,
            'search_EQ_uniformSocialCredCode':search_EQ_uniformSocialCredCode,
            'search_EQ_orgInstCode':search_EQ_orgInstCode,
            'search_EQ_operateUser':search_EQ_operateUser,
            'search_EQ_operateDept':search_EQ_operateDept,
            'search_GTE_LTE_operateDate_DATE_RANGE':search_GTE_LTE_operateDate_DATE_RANGE,
            'search_EQ_operateType':search_EQ_operateType,
            'search_EQ_sysCode':search_EQ_sysCode,
            'search_EQ_queryFormat':search_EQ_queryFormat
        }
        req = Request(ServerUrl.ent_reportlog_getpage_url,params=data,headers=cookie)
        return req.get()

    @classmethod
    def detail(cls,id,cookie):
        '''跳转详情'''
        data = {
            'id':id
        }
        req = Request(ServerUrl.ent_reportlog_detail_url,params=data,headers=cookie)
        return req.get()

    @classmethod
    def findbyid(cls, id, cookie):
        '''详情'''
        data = {
            'id': id
        }
        req = Request(ServerUrl.ent_reportlog_findbyid_url, params=data, headers=cookie)
        return req.post()

    @classmethod
    def exportload(cls,search_EQ_enterpriseName,
                        search_EQ_signCode,
                        search_EQ_uniformSocialCredCode,
                        search_EQ_orgInstCode,
                        search_EQ_operateUser,
                        search_EQ_operateDept,
                        search_GTE_LTE_operateDate_DATE_RANGE,
                        search_EQ_operateType,
                        search_EQ_sysCode,
                        search_EQ_queryFormat,
                        ids,cookie):
        '''导出'''
        data = {
            'search_EQ_enterpriseName':search_EQ_enterpriseName,
            'search_EQ_signCode':search_EQ_signCode,
            'search_EQ_uniformSocialCredCode':search_EQ_uniformSocialCredCode,
            'search_EQ_orgInstCode':search_EQ_orgInstCode,
            'search_EQ_operateUser':search_EQ_operateUser,
            'search_EQ_operateDept':search_EQ_operateDept,
            'search_GTE_LTE_operateDate_DATE_RANGE':search_GTE_LTE_operateDate_DATE_RANGE,
            'search_EQ_operateType':search_EQ_operateType,
            'search_EQ_sysCode':search_EQ_sysCode,
            'search_EQ_queryFormat':search_EQ_queryFormat,
            'ids':ids
        }
        req = Request(ServerUrl.ent_reportlog_exportload_url,params=data,headers=cookie)
        return req.get_download()





if __name__ == "__main__":
    pass